package com.lhy.mymall.mapper;

import com.lhy.mymall.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: 卢辉宇
 * @date: 2022/12/16 21:23
 * @description:
 */
@Mapper
public interface ProductMapper {
//    @Select("select * from crazy_mall_product where name=#{name}")
    Product selectByName(String name);
    int insertProduct(Product product);

    int updateById(Product product);

    int deleteById(Integer id);

    void batchUpdateShellStatus(@Param("ids") Integer[] ids,@Param("status") Integer status);

    List<Product> selectAll();

    Product selectById(Integer id);

    List<Product> selectList(String keyWord);
}
